clear all
// Change directory - Alter this command to the local copy of the "PrimaryModel" directory
cd "/Users/connorforsythe/Library/CloudStorage/Box-Box/CMU/Marginal Mileage Project/Publication Replication Code/JAERE/PrimaryModel"
//Prevent graphics from popping up while running code
set graphics off
//Execute Stata Do File to load and clean the data for VMT models
do LoadDataVMT

gen popShareUrban = metropopulation/(metropopulation+nonmetropopulation)
bro state year population metropopulation nonmetropopulation popShareUrban ruralvmtmillions urbanvmtmillions vmtmillions yearrelativeend

preserve

drop if yearrelativeend==.

export delimited "Data/VMTUrbanizationTreated.csv", replace

restore

preserve

drop if yearrelativeend!=.

export delimited "Data/VMTUrbanizationUntreated.csv", replace

restore

